<template>
  <div class="app-container">
    <el-card style="width: 600px; margin: 0 auto;">
      <div slot="header">
        <span>意见反馈</span>
      </div>
      <el-input
        type="textarea"
        v-model="feedBack.feedbackContent"
        placeholder="反馈内容"
        style="vertical-align: inherit;"
        
      />
      <el-input v-model="feedBack.contactInfo" placeholder="联系方式"></el-input>
      <el-button class="commitBt" type="primary" @click="commitQuestion">提交反馈</el-button>
    </el-card>
  </div>
</template>

<script>
import { addFeedback } from '@/api/TeachingCenter/feedbackManage'
  export default {
    
    data() {
      return {
          feedBack:{
            feedbackContent: '',
            contactInfo:'',
            createTime: "",
            dataFlag: 0,
            feedbackId: 0,
            feedbackStatus: 0,
            feedbackType: 0,
            handleContent: "",
            handleTime: "",
            staffId: 0,
            staffName: "",
            userId: 0,
            userName: ""
          }
      }
    },methods:{
      async commitQuestion(){
        console.log(this.feedBack);
        const {success}= await addFeedback(this.feedBack)
        if(!success) return 
        this.$message({
          message: '反馈成功',
          type: 'success'
        });
      }
    }
  }
</script>

<style lang="scss" scoped>
  .app-contianer {
    text-align: center;
  }
  .commitBt{
    margin-top: 8px;
  }
</style>
